import pygame


BACKGROUND_MUSIC = "music/background.mid"
SHOOT_SOUND = "music/shoot.wav"
EXPLOSION_SOUND = "music/explosion.wav"


pygame.mixer.init()

def play_background_music():
    pygame.mixer.music.load(BACKGROUND_MUSIC)
    pygame.mixer.music.play(-1)
    pygame.mixer.music.set_volume(0.3)


def play_shoot_sound():
    pygame.mixer.Sound(SHOOT_SOUND).play()
    pygame.mixer.Sound(SHOOT_SOUND).set_volume(0.2)


def play_explosion_sound():
    pygame.mixer.Sound(EXPLOSION_SOUND).play()
    pygame.mixer.Sound(EXPLOSION_SOUND).set_volume(0.2)
